<?php
class Student extends AppModel {

    public $recursive = -1;
    public $name = 'Student';
    public $validate = array(
        'number' => array('notempty'),
        'name' => array('notempty')
    );

    //The Associations below have been created with all possible keys, those that are not needed can be removed
    public $belongsTo = array(
        'StudentMinority' => array(
            'className' => 'StudentMinority',
            'foreignKey' => 'student_minority_id',
            'counterCache' => true,
            'conditions' => '',
            'fields' => '',
            'order' => ''
        ),
        'StudentProvince' => array(
            'className' => 'StudentProvince',
            'foreignKey' => 'student_province_id',
            'counterCache' => true,
            'conditions' => '',
            'fields' => '',
            'order' => ''
        )
    );

    public $hasOne = array(
        'StudentResume' => array(
            'className' => 'StudentResume',
            'foreignKey' => 'student_id',
            'dependent' => true,
            'conditions' => '',
            'fields' => '',
            'order' => ''
        )
    );

    public $hasAndBelongsToMany = array(
        'Job' => array(
            'className' => 'Job',
            'joinTable' => 'students_jobs',
            'foreignKey' => 'student_id',
            'associationForeignKey' => 'job_id',
            'counterCache' => true,
            'dependent' => true,
            'unique' => true,
            'conditions' => '',
            'fields' => '',
            'order' => '',
            'limit' => '',
            'offset' => '',
            'finderQuery' => '',
            'deleteQuery' => '',
            'insertQuery' => ''
        )
    );

}
?>